package com.lyx.question.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lyx.common.utils.PageUtils;
import com.lyx.question.dto.ESQuestionDto;
import com.lyx.question.dto.SearchResult;
import com.lyx.question.entity.ESQuestion;
import com.lyx.question.entity.Question;
import com.lyx.question.vo.QuestionVo;
import com.lyx.question.vo.SearchParam;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 14667
 * @date 2022/7/20 15:32
 */
@Service
public interface QuestionService extends IService<Question> {
    boolean addQuestion(QuestionVo questionVo);

    boolean deleteQuestion(Integer id);

    PageUtils selectQuestionByIdAndChapterId(Integer id, Integer chapterId, Integer currentPage, Integer size);

    PageUtils listWithPage(Integer currentPage, Integer size);

    boolean updateQuestion(QuestionVo questionVo);

    void saveAll();

    SearchResult indexSearch(String text, long currentPage, long size);

    void updateRank();

}
